#include "index.hpp"
#include "searcher.hpp"
#include <cstdio>

const std::string out_path = "data/raw_html/raw.txt";

int main()
{
    Ns_Searcher::Searcher* search = new Ns_Searcher::Searcher;
    search->InitSearcher(out_path);
    std::string keyword;
    std::string result;
    while (true)
    {
        std::printf("Please enter the keyword you want to search# ");
        fflush(stdout);
        std::getline(std::cin , keyword);
        search->Search(keyword, &result);
        std::printf("result:\n\t%s\n", result.c_str());
    }
    return 0;
}